import Vue from "vue";
import App from "./App.vue";
//引入仓库
import store from "@/store";

//三级联动组件---全局组件
import TypeNav from "@/components/TypeNav";
//第一个参数：全局组件的名字 第二个参数：哪一个组件
Vue.component(TypeNav.name, TypeNav);
// 轮播图---全局组件
import Carousel from "@/components/Carousel";
Vue.component(Carousel.name, Carousel);
// 分页器---全局组件
import Pagination from "@/components/Pagination";
Vue.component(Pagination.name, Pagination);

//引入路由
import router from "@/router";

// 引入mock
import "@/mock/mockServe";

// 引入swiper
import "swiper/css/swiper.css";

/* //测试
import {getBaseCategoryList} from '@/api/index'
getBaseCategoryList()
 */

Vue.config.productionTip = false;

new Vue({
  render: (h) => h(App),
  beforeCreate() {
    Vue.prototype.$bus = this;
  },
  //注册路由
  router: router,
  //注册仓库:组件实例的身上会多个$store属性
  store,
}).$mount("#app");
